import { createRouter, createWebHashHistory } from "vue-router";
import Home from "../views/Home.vue";
const routes = [
  {
    path: "/home",
    name: "home",
    component: Home,
    // 重定向
    redirect: "/",
    // 子路由
    children: [
      {
        path: "/",
        name: "chartLibrary",
        /** 懒加载 */
        component: () => import("../views/chartLibrary/index.vue"),
      },

      {
        path: "/analyze",
        name: "analyze",
        component: () => import("../views/home/index.vue"),
      },
      {
        path: "/topJournalInspiration",
        name: "topJournalInspiration",
        component: () => import("../views/topJournalInspiration/index.vue"),
      },
      {
        // 顶刊详情
        path: "/topJournalDetail",
        name: "topJournalDetail",
        component: () => import("../views/topJournalInspiration/detail.vue"),
      },
      {
        path: "/colorScheme",
        name: "colorScheme",
        component: () => import("../views/colorScheme/index.vue"),
      }
    ]
  },
];
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
